
<div class="search">
<h1>京东搜索</h1>
<input type="text" [(ngModel)]="keyWords" ><button (click)="doSearch()">搜索</button>
<hr>
<p>列表</p> 
<!-- 在点击button的时候就能够获取到keyWords的值 -->
<ul>
    <li *ngFor="let item of historyList; let key = index">{{item}}---<button (click)="deleteHistory(key)">X</button></li>
</ul>
</div>
<hr>
<hr>


